home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
music4c.sit
/
Music4C Folder
/
Sources Folder
/
Music4C.h
< prev
next >
Wrap
Text File
|
1990-06-08
|
2KB
|
74 lines
/*
* ⌐ Graeme Gerrard 1990
* Faculty of Music, University of Melbourne
* Parkville Victoria 3052 Australia.
*
* ARPANET: grae@murdu.ucs.unimelb.edu.au
* telephone: (613) 344 4127, Fax: (613) 344 5346
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "ErrorAlert.h"
#define TRUE 1
#define FALSE 0
#define NIL 0
#define MAXSTRING 128 /* max length of strings */
#define MAXCARD 255 /* max chars on a "card" */
#define MAXPARAMS 100 /* max number of event parameters */
#define MAXLINE 70 /* max length of an inout line */
#define MAXINSTRS 99 /* max number of instruments in orchestra */
#define MAXCHANS 4 /* max number of output channels */
#define CARRY_CODE '*' /* carry indicator for pass1 */
#define SRATE 44100.0 /* default sampling rate */
#define MAXFUNCS 100 /* max number of stored functions */
#define MAX_TEMPO_CARDS 10 /* max number of "t" cards per section */
#define ENDOP -1 /* terminates I or note card */
#define NULLOP 0 /* nop */
#define IOP 1 /* I or note card */
#define FOP 2 /* F or function card */
#define SOP 3 /* S or section card */
#define EOP 4 /* E or end card */
#define TOP 5 /* T or tempo card */
#define ROP 6 /* R or instrument group renumber card */
#define COP 7 /* C or comment card */
#define OOP 8 /* O or output card */
#define SAMPBUFSZ 2048 /* buffer size for sample blocks */
#define SAMPMAX 32767.0 /* max sample magnitude */
#define MAX(x,y) (x) > (y) ? (x) : (y)
#define MIN(x,y) (x) < (y) ? (x) : (y)
/*
* Event, singly linked list for events
*/
typedef struct Event {
struct Event *next; /* pointer to next event */
int op; /*event opcode*/
/*char op; event opcode */
int nargs; /* number of event arguments */
double *pptr; /* pointer to parameter array */
} Event;
Event *insert_in_list();
/* sound file types */
#define AIFF 1
#define FLOAT 2
#define INT16 3
#define SD 4
#define SD2 5
#define PASS1_2_DIALOG 8
#define PASS3_DIALOG 6
#define ABOUT_DIALOG 4